<%--
  Created by IntelliJ IDEA.
  User: Tony丝瓜壳
  Date: 2024-4-29
  Time: 10:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div style="width: 48%;display: inline-block;">
    <div id="countTableDiv">
        <table class="viewTable" id="countTable" >

            <tr>
                <th colspan="5" style="background-color: #56c976">航班信息表数据(A检)</th>
            </tr>
            <tr>
                <td class="tTitle">
                    机型
                </td>
                <td class="tTitle">
                    单价
                    （不含税）
                </td>
                <td class="tTitle">
                    飞行小时
                </td>
                <td class="tTitle">
                    合计
                    （不含税）
                </td>
                <td class="tTitle">
                    合计
                    （含13%税）
                </td>
            </tr>
            <c:if test="${fn:length(dbNewInfoA)==0}">
                <tr>
                    <td colspan="5" class="tTitle" >
                        请先上传航班信息再进行比对
                    </td>
                </tr>
            </c:if>
            <c:if test="${fn:length(dbNewInfoA)>0}">
                <c:forEach items="${dbNewInfoA}" var="dbNewInfoA">
                    <c:choose>
                        <c:when test="${dbNewInfoA.dataType=='2'}">
                            <tr class="viewTr">
                                <td></td>
                                <td class="tTitle">共计</td>
                                <td>${dbNewInfoA.gjFxxs}</td>
                                <td>${dbNewInfoA.gjBhs}</td>
                                <td>${dbNewInfoA.gjHs}</td>
                            </tr>
                        </c:when>
                        <c:otherwise>
                            <tr class="viewTr">
                                <td>${dbNewInfoA.airPlaneType}</td>
                                <td>${dbNewInfoA.unitPrice}</td>
                                <td>${dbNewInfoA.flightHours}</td>
                                <td>${dbNewInfoA.hjBhs}</td>
                                <td>${dbNewInfoA.hjHs}</td>
                            </tr>
                        </c:otherwise>
                    </c:choose>

                </c:forEach>
            </c:if>

        </table>
    </div>
    <div id="editTableDiv" style="display: none">
        <table class="viewTable" id="editTable"  >

            <tr>
                <th colspan="5" style="background-color: #56c976">航班信息表数据(A检)
                    <a  class="layui-btn layui-btn-warm layui-btn-sm" id="onEditSave">保存数据</a>
                    <a  class="layui-btn layui-btn-normal layui-btn-sm" id="onEditRevert">还原数据</a>
                </th>

            </tr>
            <tr>
                <td class="tTitle">
                    机型
                </td>
                <td class="tTitle">
                    单价
                    （不含税）
                </td>
                <td class="tTitle">
                    飞行小时
                </td>
                <td class="tTitle">
                    合计
                    （不含税）
                </td>
                <td class="tTitle">
                    合计
                    （含13%税）
                </td>
            </tr>
            <c:if test="${fn:length(dbNewInfoA)==0}">
                <tr>
                    <td colspan="5" class="tTitle" >
                        请先上传航班信息再进行比对
                    </td>
                </tr>
            </c:if>
            <c:if test="${fn:length(dbNewInfoA)>0}">
                <c:forEach items="${dbNewInfoA}" var="dbNewInfoA" varStatus="dbIndex">
                    <c:choose>
                        <c:when test="${dbNewInfoA.dataType=='2'}">
                            <tr id="${dbIndex.count}_gj" class="editTr">
                                <td><input type="hidden" name="airPlaneType" value="all" /></td>
                                <td class="tTitle">共计</td>
                                <td class="editTd"><%--${dbNewInfoA.gjFxxs}--%>
                                    <input type="number" name="gjFxxs" class="layui-input"   value="${dbNewInfoA.gjFxxs}">
                                </td>
                                <td class="editTd">
                                    <input type="number" name="gjBhs" class="layui-input"   value="${dbNewInfoA.gjBhs}"></td>
                                <td class="editTd"><%--${dbNewInfoA.gjHs}--%>
                                    <input type="number" name="gjHs" class="layui-input"   value="${dbNewInfoA.gjHs}"></td>
                            </tr>
                        </c:when>
                        <c:otherwise>
                            <tr id="${dbIndex.count}_jx" class="editTr">
                                <td style="min-width: 68px">${dbNewInfoA.airPlaneType}
                                    <input type="hidden" name="airPlaneType" value="${dbNewInfoA.airPlaneType}" /></td>
                                <td class="editTd"><%--${dbNewInfoA.unitPrice}--%>
                                    <input type="number" name="unitPrice" class="layui-input"   value="${dbNewInfoA.unitPrice}"></td>
                                <td class="editTd"><%--${dbNewInfoA.flightHours}--%>
                                    <input type="number" name="flightHours" class="layui-input"   value="${dbNewInfoA.flightHours}"></td>
                                <td class="editTd"><%--${dbNewInfoA.hjBhs}--%>
                                    <input type="number" name="hjBhs" class="layui-input"   value="${dbNewInfoA.hjBhs}"></td>
                                <td class="editTd"><%--${dbNewInfoA.hjHs}--%>
                                    <input type="number" name="hjHs" class="layui-input"   value="${dbNewInfoA.hjHs}"></td>
                            </tr>
                        </c:otherwise>
                    </c:choose>

                </c:forEach>
            </c:if>

        </table>
    </div>


</div>
</body>
</html>
